package fudan.se.lab2.repository;

import fudan.se.lab2.domain.Invitation;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface InvitationRepository extends CrudRepository<Invitation, Long> {
    Iterable<Invitation> findByFromUsername(String fromUsername);

    Iterable<Invitation> findByToUsername(String toUsername);

    Iterable<Invitation> findByMeetingFullName(String meetingFullName);

    Invitation findByToUsernameAndMeetingFullName(String toUsername, String meetingFullName);
}
